package com.yuedao.sender.model1;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * Created with IntelliJ IDEA
 * User: z
 * DATE: 2018/7/26
 * TIME: 2018-07-26
 * Description:
 */
@Entity
@Table(name = "ydx_reservation_reminding")
public class ReservationRemindingEntity {
    private int id;
    private String orderNo;
    private Integer driverUserId;
    private Timestamp orderScheduledTime;
    private Timestamp remindingTimePoint;
    private String remindingType;
    private Integer execute;
    private String extA;
    private String extB;
    private String extC;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "order_no", nullable = true, length = 32)
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "driver_user_id", nullable = true)
    public Integer getDriverUserId() {
        return driverUserId;
    }

    public void setDriverUserId(Integer driverUserId) {
        this.driverUserId = driverUserId;
    }

    @Basic
    @Column(name = "order_scheduled_time", nullable = true)
    public Timestamp getOrderScheduledTime() {
        return orderScheduledTime;
    }

    public void setOrderScheduledTime(Timestamp orderScheduledTime) {
        this.orderScheduledTime = orderScheduledTime;
    }

    @Basic
    @Column(name = "reminding_time_point", nullable = true)
    public Timestamp getRemindingTimePoint() {
        return remindingTimePoint;
    }

    public void setRemindingTimePoint(Timestamp remindingTimePoint) {
        this.remindingTimePoint = remindingTimePoint;
    }

    @Basic
    @Column(name = "reminding_type", nullable = true, length = 255)
    public String getRemindingType() {
        return remindingType;
    }

    public void setRemindingType(String remindingType) {
        this.remindingType = remindingType;
    }

    @Basic
    @Column(name = "execute", nullable = true)
    public Integer getExecute() {
        return execute;
    }

    public void setExecute(Integer execute) {
        this.execute = execute;
    }

    @Basic
    @Column(name = "ext_a", nullable = true, length = 255)
    public String getExtA() {
        return extA;
    }

    public void setExtA(String extA) {
        this.extA = extA;
    }

    @Basic
    @Column(name = "ext_b", nullable = true, length = 255)
    public String getExtB() {
        return extB;
    }

    public void setExtB(String extB) {
        this.extB = extB;
    }

    @Basic
    @Column(name = "ext_c", nullable = true, length = 255)
    public String getExtC() {
        return extC;
    }

    public void setExtC(String extC) {
        this.extC = extC;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ReservationRemindingEntity that = (ReservationRemindingEntity) o;
        return id == that.id &&
                Objects.equals(orderNo, that.orderNo) &&
                Objects.equals(driverUserId, that.driverUserId) &&
                Objects.equals(orderScheduledTime, that.orderScheduledTime) &&
                Objects.equals(remindingTimePoint, that.remindingTimePoint) &&
                Objects.equals(remindingType, that.remindingType) &&
                Objects.equals(execute, that.execute) &&
                Objects.equals(extA, that.extA) &&
                Objects.equals(extB, that.extB) &&
                Objects.equals(extC, that.extC);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, orderNo, driverUserId, orderScheduledTime, remindingTimePoint, remindingType, execute, extA, extB, extC);
    }
}
